<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格练习</title>
</head>
    <body>
        <table border="1px">
            <caption>讲师信息表</caption>
            <tr>
                <th>编号</th>
                <th>讲师</th>
                <th>课程</th>
            </tr>
            <tr>
                <td style="text-align: center">1</td>
                <td>传奇</td>
                <td>数据库</td>
            </tr>
            <tr>
                <td>2</td>
                <td>索伯</td>
                <td>SRE</td>
            </tr>
            <tr>
                <td>3</td>
                <td>强哥</td>
                <td>微服务</td>
            </tr>
        </table>

        <table border="1px">
            <!--合并单元格-->
            <!--colspan="n" 跨列 横着合并 从当前单元格开始合并 n列-->
            <!--rowspan="n" 跨行 竖着合并 从当前单元格开始合并 n行-->
            <caption>表格</caption>
            <tr>
                <th>1</th>
                <th>2</th>
                <th>3</th>
                <th>4</th>
            </tr>
            <tr>
                <td>1-1</td>
                <td>1-2</td>
                <td>1-3</td>
                <td>1-4</td>
            </tr>
            <tr>
                <td colspan="2">2-1</td>
                <!--<td></td>-->
                <td>2-3</td>
                <td rowspan="3">2-4</td>
            </tr>
            <tr>
                <td>3-1</td>
                <td>3-2</td>
                <td>3-3</td>
                <!--<td></td>-->
            </tr>
            <tr>
                <td>4-1</td>
                <td>4-2</td>
                <td>4-3</td>
                <!--<td></td>-->
            </tr>
        </table>
       <hr>
    <table border="1px" style="border-collapse: collapse;>
        <caption>购物车</caption>
        <tr>
            <th>商品编号</th>
            <th>商品名称</th>
            <th>商品单价</th>
        </tr>
        <tr>
            <td>1</td>
            <td>小米</td>
            <td>5877</td>
        </tr>
        <tr>
            <td>2</td>
            <td>华为</td>
            <td>8877</td>
        </tr>
        <tr>
            <td>总价:</td>
            <td colspan=2>10000</td>
        </tr>
    </table>
    </body>
</html>